]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
barLevel: Stop capping border-width at 1 pixel
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 26 Oct 2023 13:17:45 +0000 (15:17 +0200)
committerMarge Bot <marge-bot@gnome.org>
Tue, 21 Nov 2023 18:55:47 +0000 (18:55 +0000)
I can't think of a reason why limiting the border to a maximum
would make any sense.

The original intention was probably to set a minimum border width
to avoid having to deal with border/no-border complexity in the code,
but as cairo accepts a line width of 0, it just works.

However limiting the size to the overall height seems reasonable,
as at that size a bigger height and different fill color can
achieve the same effect without requires special handling of
other values like the radius.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2994>

js/ui/barLevel.js

index 66e333899ab8806ebf2a2d9ac10c3bb0fc1eecca..ba6bf1d502287829e4c48d7e669594af74f88c07 100644 (file)
@@ -110,7 +110,7 @@ export const BarLevel = GObject.registerClass({
         let barLevelActiveColor = themeNode.get_color('-barlevel-active-background-color');
         let barLevelOverdriveColor = themeNode.get_color('-barlevel-overdrive-color');
 
-        let barLevelBorderWidth = Math.min(themeNode.get_length('-barlevel-border-width'), 1);
+        let barLevelBorderWidth = Math.min(themeNode.get_length('-barlevel-border-width'), barLevelHeight);
         let [hasBorderColor, barLevelBorderColor] =
             themeNode.lookup_color('-barlevel-border-color', false);
         if (!hasBorderColor)